<!--
 * @Author: wjc
 * @Date: 2025-09-11 10:56:59
 * @LastEditors: wjc
 * @LastEditTime: 2025-09-15 15:50:54
 * @Description: 
-->
<template>
  <NiceButton
    variant="icon"
    size="icon"
    @click="toggle"
    :tooltip="isFullscreen ? '退出全屏' : '全屏'"
  >
    <Icon v-if="isFullscreen" icon="lucide:minimize" class="h-4 w-4" />
    <Icon v-else icon="lucide:maximize" class="h-4 w-4" />
  </NiceButton>
</template>

<script setup lang="ts">
  import { Icon } from '@iconify/vue'
  import { NiceButton } from '@nice/nice-ui'
  import { useFullscreen } from '@vueuse/core'

  defineOptions({ name: 'LayoutFullScreen' })

  const { isFullscreen, toggle } = useFullscreen()
</script>
